// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

export component A  {
    ContextMenuArea {
        show => {
//      ^error{'show' is not a callback in ContextMenuArea}
            debug("hello");
        }

        Menu {
        }


        property <int> entries: 45;
//      ^error{Cannot re-define internal property 'entries'}
        property <int> sub-menu: 45;
//      ^error{Cannot re-define internal property 'sub-menu'}
        property <string> activated: "me";
//      ^error{Cannot re-define internal property 'activated'}

        property <string> xyz: "me";

    }

    ContextMenuArea { Rectangle {} }
//  ^error{ContextMenuArea should have a Menu}

    ContextMenuArea {
        Menu {
            MenuItem { title: "ok"; }
        }
        Menu {
//      ^error{Only one Menu is allowed in a ContextMenu}
            MenuItem { title: "hello"; }
        }
    }

    ContextMenuArea {
        if false : Menu {}
//                 ^error{ContextMenuArea's root Menu cannot be in a conditional or repeated element}
    }
    ContextMenuArea {
        for _ in [1,2,3] : Menu {}
//                         ^error{ContextMenuArea's root Menu cannot be in a conditional or repeated element}
    }
}

